package com.molichuxing.services.infrastructure.service.impl;

import com.molichuxing.services.infrastructure.bean.ThirdViolationLogBean;
import com.molichuxing.services.infrastructure.dao.ThirdViolationLogMapper;
import com.molichuxing.services.infrastructure.dto.request.create.ThirdViolationLogCreateDto;
import com.molichuxing.services.infrastructure.service.ThirdViolationLogService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author: renzhengyu
 * @Description:
 * @Date: Created in 17:06 2019/11/13
 * @Modified By:
 **/
@Service("thirdViolationLogService")
public class ThirdViolationLogServiceImpl implements ThirdViolationLogService {

    @Autowired
    private ThirdViolationLogMapper thirdViolationLogMapper;


    @Override
    public int create(ThirdViolationLogCreateDto dto) {
        ThirdViolationLogBean bean = new ThirdViolationLogBean();
        BeanUtils.copyProperties(dto, bean);
        return thirdViolationLogMapper.create(bean);
    }
}
